<%@page language="java" pageEncoding="utf-8" import="java.util.*,entity.*,dao.*,dao.impl.*"%>
<%
request.setCharacterEncoding("utf-8");

String userName = request.getParameter("userName");
String userPass = request.getParameter("userPass");
UserDao userDao =new UserDaoImpl();
User user =userDao.findUser(userName);

if(user!= null && user.getUPass().equals(userPass)){
session.setAttribute("user",user);
out.println("登陆成功");
}else{
out.println("登陆失败");
}
 %>
